package com.fh.common.filter;

import java.io.IOException;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;

import com.alibaba.druid.support.http.WebStatFilter;
import com.fh.common.system.log.service.RequestLogMongoService;

/**
 * 
 * @author junqiu
 *
 */
public class FhWebStatFilter extends WebStatFilter {
	
	private RequestLogMongoService requestLogMongoService=null;

	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
			throws IOException, ServletException {
		HttpServletRequest servletRequest=(HttpServletRequest) request;
//		if(requestLogMongoService==null) {
//			requestLogMongoService=SpringContextUtils.getBean(RequestLogMongoServiceImpl.class);
//		}
//		requestLogMongoService.addRequestLog(new RequestLog().init(servletRequest));
		super.doFilter(request, response, chain);
	}
}
